package com.testmanager.testmananger.quantitative.domain;

import com.testmanager.testmananger.foundation.domain.AbstractAuditingEntity;
import com.testmanager.testmananger.quantitative.constants.IterationStatus;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "yx_iteration_info")
@Data
@Accessors(chain = true)
public class IterationInfoEntity extends AbstractAuditingEntity implements Serializable {

    private static final long serialVersionUID = 5000416594069831696L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private long id;
    @Column(name = "project_name")
    private String projectName;//所属工程
    @Column(name = "iteration_name")
    @NotNull(message = "迭代名称不能为空")
    private String name;

    @Column(nullable = false)
    @Convert(converter = IterationStatusConvert.class)
    private IterationStatus status;
    @Column
    private String comment;

    //private Date completetime;
}
